package com.first.nell.data

import com.first.nell.utils.AppConfigUtil
import com.first.nell.utils.UserStateUtil

data class RevObjLoanDetail(
    val amount: String,
    val days: String,
    val realAmount: String,
    val processingFee: String,
    val bankAccount: String,
    val repayAmount: String,
    val interest: String,
    val repayProFee: String?,
    //放款手续费
    val processingVatFee: String,
    //还款手续费
    val repayProVatFee: String,
    //逾期费率
    val overdueRate: String,

    val walletMobile: String?,
    val walletUsername: String?,
    val walletChannel: String?,

    //currency
    val currency: String?
) {
    fun displayFirstNellAmount(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "10000"
        }
        return amount
    }

    fun displayFirstNellDays(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "365"
        }
        return days
    }

    fun displayFirstNellRealFirstNellAmount(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "10000"
        }
        return realAmount
    }

    fun displayFirstNellProcessingFirstNellFee(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "0"
        }
        return processingFee
    }

    fun displayFirstNellRepayFirstNellAmount(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "12400"
        }
        return repayAmount
    }

    fun displayFirstNellInterest(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "2400"
        }
        return interest
    }

    fun displayFirstNellRepayFirstNellProFirstNellFee(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "2400"
        }
        return repayProFee ?: "0"
    }

    fun displayFirstNellProcessingFirstNellVatFirstNellFee(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "2400"
        }
        return processingVatFee ?: "0"
    }

    fun displayFirstNellRepayFirstNellProFirstNellVatFirstNellFee(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "0"
        }
        return repayProVatFee ?: "0"
    }

    fun displayFirstNellOverdueFirstNellRate(): String {
        val mobile = UserStateUtil.mFirstNellMobile
        if (AppConfigUtil.isFirstNellReviewFirstNellAccount(mobile = mobile)) {
            return "0.03"
        }
        return overdueRate ?: "0"
    }
}